package com.weds.data_sync.pojo.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.time.LocalDateTime;

/**
 * <p>
 * 数据同步-数据库信息
 * </p>
 *
 * @author lhw
 * @since 2023-12-29
 */
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
@TableName("public.data_sync_db_info")
@Schema(name = "DataSyncDbInfoDO", description = "数据同步-数据库信息")
public class DataSyncDbInfoDO {

    @Schema(description = "数据库id")
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    @Schema(description = "数据库类型 1:pg,2:mysql【字典】")
    @TableField("db_type")
    private Integer dbType;

    @Schema(description = "ip地址")
    @TableField("ip")
    private String ip;

    @Schema(description = "端口号")
    @TableField("port")
    private String port;

    @Schema(description = "数据库名称")
    @TableField("db_name")
    private String dbName;

    @Schema(description = "用户名")
    @TableField("username")
    private String username;

    @Schema(description = "密码")
    @TableField("password")
    private String password;

    @Schema(description = "数据源分类: 1 业务库 2 前置库 3 三方库")
    @TableField("ds_type")
    private Integer dsType;

    @Schema(description = "启用状态")
    @TableField("use_status_id")
    private Integer useStatusId;

    @Schema(description = "删除状态")
    @TableField("is_delete")
    private Integer isDelete;

    @Schema(description = "备注")
    @TableField("remark")
    private String remark;

    @Schema(description = "创建时间")
    @TableField("ct_date")
    private LocalDateTime ctDate;

    @Schema(description = "修改时间")
    @TableField("lt_date")
    private LocalDateTime ltDate;

    @Schema(description = "创建用户id")
    @TableField("ct_user_id")
    private Integer ctUserId;

    @Schema(description = "修改用户id")
    @TableField("lt_user_id")
    private Integer ltUserId;
}
